package graph.group.zhangtao.guider.model;

import android.content.Context;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Me on 2017/12/26.
 */

public class Content {
    private String url;
    private String content;
    private String style;
    private String type;

    public Content(String url, String content, String style, String type) {
        this.url = url;
        this.content = content;
        this.style = style;
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    public static Content processJsonObject(JSONObject jsonObject) throws JSONException {
        return new Content(
                jsonObject.getString("url"),
                jsonObject.getString("content"),
                jsonObject.getString("style"),
                jsonObject.getString("type")
        );
    }
}
